<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>

    var fun = function(){
        var trs = "";
        for(var i=0;i<5;i++){
            var tds = "";
            for(var j=0;j<7;j++){
                tds += "<td>&nbsp;"+ i + "-" + j +"&nbsp;</td>";
            }
            trs += "<tr>"+ tds +"</tr>";
        }
        document.write("<table border='1'>"+ trs +"</table>");
    }
    
    function fn(){
        for(var i=1;i<=9;i++){
            for(var j=1;j<=i;j++){
                document.write(j + "*" + i + "=" + i*j + "&nbsp;");
            }
            document.write("<br>");
        }
    }
    


    fun();

    fn();

    fun();


    // 1. 创建函数
    // 2. 定义功能
    // 3. 设置出口
    // 4. 执行函数

    
</script>
</html>